The CxFacEditor object contains the following methods:
The Configure method launches a Facility Attribute Definitions dialog box, which is used to configure facility attributes.
Configure() As Integer
This method returns one of the following values:
| -1 or 0 | An error occurred. | |
| 2 | Close button was pressed. |
Example
The following example launches a Facility Attribute Definitions dialog box.
|
Sub Dim iRet iRet= FacEditor.Configure MsgBox iRet End Sub |
The Connect method connects to an FAC.
Connect(DomainSiteService As String)
| Parameter | Required | Description |
|---|---|---|
|
DomainSiteService |
Yes |
The [Domain]Site.Service to which to connect. A domain is optional. The service must be a valid FAC. |
Example
The following example creates and connects the CxFacEditor object.
|
Sub Dim FacEditor Set FacEditor = CreateObject("CxEditors.CxFacEditor") FacEditor.Connect("[5410]CYGDEMO.FAC") End Sub |
The Copy method launches a New Facility property sheet initialized with the information in the specified record. This method accepts either a Facility Tag string or database queue key, eliminating the need to call the Find method to obtain the database queue key from the Facility Tag components.
Copy(QueueKey As String) As Integer
| Parameter | Required | Description |
|---|---|---|
|
QueueKey |
Yes |
The database queue key of the record to copy. |
This method returns one of the following values:
| -1 or 0 | An error occurred. | |
|
1 |
OK button was pressed. | |
| 2 | Cancel button was pressed. |
Example
The following example launches a New Facility property sheet for record "0000000319."
|
Sub Dim iRet iRet= FacEditor.Copy("0000000319") MsgBox iRet End Sub |
The Delete method launches a Delete Facility property sheet initialized with the information in the specified record. This method accepts either a Facility Tag string or database queue key, eliminating the need to call the Find method to obtain the database queue key from the Facility Tag components.
Delete(QueueKey As String) As Integer
| Parameter | Required | Description |
|---|---|---|
|
QueueKey |
Yes |
The database queue key of the record to delete. |
This method returns one of the following values:
| -1 or 0 | An error occurred. | |
|
1 |
OK button was pressed. | |
| 2 | Cancel button was pressed. |
Example
The following example launches a Delete Facility property sheet for record "0000108387."
|
Sub Dim iRet iRet= FacEditor.Delete("0000108387") MsgBox iRet End Sub |
The Disconnect method disconnects from the connected FAC service.
Disconnect()
Example
The following example disconnects the FacEditor object.
|
Sub FacEditor.Disconnect End Sub |
The Edit method launches a property sheet for the specified record. This method accepts either a Facility Tag string or database queue key, eliminating the need to call the Find method to obtain the database queue key from the Facility Tag components.
Edit(QueueKey As String) As Integer
| Parameter | Required | Description |
|---|---|---|
|
QueueKey |
Yes |
The database queue key of the record to edit. |
This method returns one of the following values:
| -1 or 0 | An error occurred. | |
|
1 |
OK button was pressed. | |
| 2 | Cancel button was pressed. |
Example
The following example launches a property sheet for record "0000000319."
|
Sub Dim iRet iRet= FacEditor.Edit("0000000319") MsgBox iRet End Sub |
The New method launches a New Facility property sheet.
New() As Integer
This method returns one of the following values:
| -1 or 0 | An error occurred. | |
|
1 |
OK button was pressed. | |
| 2 | Cancel button was pressed. |
Example
The following example launches a New Facility property sheet.
|
Sub Dim iRet iRet= FacEditor.New MsgBox iRet End Sub |
The View method launches a property sheet for the specified record. This method accepts either a Facility Tag string or database queue key, eliminating the need to call the Find method to obtain the database queue key from the Facility Tag components.
View(Key As String, EditEnabled As Boolean) As Integer
| Parameter | Required | Description |
|---|---|---|
|
Key |
Yes |
The database queue key of the record to view. |
|
EditEnabled |
Yes |
Set to true to enable editing of the property sheet. |
This method returns one of the following values:
| -1 or 0 | An error occurred. | |
| 2 | Cancel button was pressed. |
Example
The following example launches a property sheet for record "0000000319."
|
Sub Dim iRet iRet= FacEditor.View("0000000319", True) MsgBox iRet End Sub |